<?php

use App\Http\Controllers\Publik\IndexController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//检查用户token、平台标识
Route::group(['middleware' => 'publik', 'prefix' => 'v1'], function () {
    // 首页 - 捐赠排行
    Route::get('donation/top-list', [IndexController::class,'donationTopList']);
    // 首页 - 置顶文章
    Route::get('article/top-list', [IndexController::class,'articleTopList']);
    // 首页 - 文章详情
    Route::get('article/detail', [IndexController::class,'articleDetail']);
    // 已开通的城市
    Route::get('get/city/enabled', [IndexController::class,'getCityEnabled']);
    // 已开通的城市 - 字母排序
    Route::get('get/city/enabled/alpha', [IndexController::class,'getCityEnabledAlpha']);
});

